<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>OnlineTV</title>
        <link href="resources/css/index.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <ui:include src="header.xhtml">
            <ui:param name="" value=""/>
        </ui:include>   
        <div class="wrapper">
            <table border="0">
                <tr>
                    <th scope="col" class="menu"> 
                        <ui:include src="menu.xhtml">
                            <ui:param name="" value=""/>
                        </ui:include>
                    </th>
                    <th scope="col" class="postsbk"> 
                        <div class="profile" align="left">
                            <div class="profheader">
                                <div class="activediv"><a href="profile.xhtml"> Profile</a></div>
                                <div><a href="logmessages.xhtml">Log messages</a></div>
                                <div><a href="logviews.xhtml">Log views</a></div>
                            </div>
                            <div class="post">
                                <h:form id="updateInfo">
                                    <div style="vertical-align: top;">    
                                        <div class="avatar"><img src="resources/images/ava.png" width="100" height="120" alt="ava"/></div>
                                        <div style="display: inline-block;vertical-align: top; margin: 5px;">
                                            #{user.getUserLogin()}
                                            <br/>
                                            Rate: 0
                                            <br/>
                                            E-mail: #{user.email}
                                        </div>
                                    </div>
                                    <div align="center">
                                        <h:message for="updateInfo" infoStyle="color: green;" errorStyle="color: red;" />
                                        <br/>
                                    </div>
                                    <div align="center">
                                        First Name:
                                        <h:inputText value="#{user.firstName}" />
                                        Last Name:
                                        <h:inputText value="#{user.lastName}" />
                                        <br/><br/>
                                        <div class="pass">
                                            <a href="changepasswd.xhtml">Change password</a>
                                        </div>
                                        <br/>
                                        Date of birth:
                                        <p:calendar value="#{user.birthDate}" navigator="true" />
                                    </div>
                                    <div style="width:100%" align="right">
                                        <h:commandButton value="Save" action="#{user.updateInfo()}"/>
                                    </div>
                                </h:form>
                            </div>
                        </div>                        
                    </th>
                </tr>
            </table>
        </div>
        <ui:include src="footer.xhtml">
            <ui:param name="" value=""/>
        </ui:include>     
    </h:body>
</html>